<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:t="http://myfaces.apache.org/tomahawk"
	template="template.xhtml">

<ui:define name="content">
<h:outputText value="Registration" styleClass="titles"></h:outputText>
<h:form id="mine" enctype="multipart/form-data">
	<h:messages showDetail="true" styleClass="errors" />
	<h:panelGrid columns="3">
		<h:outputLabel for="username" value="User name" styleClass="labels" />
		<h:inputText id="username" value="#{newCustomer.customer.username}"
			required="true" styleClass="textfields"></h:inputText>
		<h:message for="username" styleClass="errors" />

		<h:outputLabel for="password" value="User Password"
			styleClass="labels" />
		<h:inputText id="password" value="#{newCustomer.customer.password}"
			required="true" styleClass="textfields">
			<f:validateLength minimum="6" maximum="20" />
		</h:inputText>
		<h:message for="password" styleClass="errors" />

		<h:outputLabel for="discount" value="Discount" styleClass="labels" />
		<h:inputText id="discount" value="#{newCustomer.customer.discount}"
			styleClass="textfields" />
		<h:message for="discount" styleClass="errors" />

		<h:outputLabel for="photo" value="Photo" styleClass="labels" />
		<t:inputFileUpload id="photo" storage="file" styleClass="textfields" required="true" value="#{newCustomer.photo}"/>
		<h:message for="photo" styleClass="errors" />
	</h:panelGrid>
	<h:commandButton value="Save" action="#{newCustomer.save}"
		styleClass="buttons" />
</h:form>
</ui:define>
</ui:composition>